module.exports = {
  apps: [{
    name: 'ts-chat',
    script: './server/index.js',
    env: {
      NODE_ENV: 'development'
    },
    env_production: {
      NODE_ENV: 'production'
    },
  }],

  deploy : {
    production : {
      user : 'ming',
      host : '81.70.40.121',
      port: '49999',
      ref  : 'origin/master',
      repo : 'git@gitee.com:dyzq-mh_w/ts-react-socket.git',
      path : '/www/chat/production',
      'pre-deploy': 'git fetch --all',
      'post-deploy' : 'npm install --registry=https://registry.npm.taobao.org && tsc -p ts_server_config.json && npm run build && pm2 reload ecosystem.config.js --env production',
    }
  }
};
